package com.learn.springboot.common;

import lombok.Getter;

/**
 * RestCode
 *
 * @author Don
 * @date 2020/07/08
 */
@Getter
public enum RestCode {
    /**
     * 成功
     */
    OK(200, "OK"),
    /**
     * 错误
     */
    ERROR(500, "Service error"),
    /**
     * 页面不存在
     */
    NO_PAGE(404, "Page not found"),
    /**
     * 校验错误
     */
    VALID_ERROR(300, "Valid error");

    public Integer code;
    public String msg;

    RestCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
